import XtxMessage from "@/components/library/message";
import "./index.scss";
import { useEffect } from "react";
import confirm from "@/components/library/confirm";
function Login() {
  // useEffect(() => {
  //   QC.Login({
  //     btnId: "qqLoginBtn", //插入按钮的节点id
  //     size: "A_XL",
  //   });
  // }, []);

  useEffect(() => {
    XtxMessage({
      type: "success",
      text: "登录成功",
      duration: 1000000,
      showClose: true,
    });
  }, []);
  const open = function () {
    confirm({
      title: "提示", ///
      text: "确定要删除吗？",
    })
      .then(() => {
        alert("自定义弹窗");
      })
      .catch((error) => {
        console.log(error);
      });
  };
  return (
    <div className="qq">
      <a
        href="https://graph.qq.com/oauth2.0/authorize?client_id=100556005&response_type=token&scope=
      all&redirect_uri=http%3A%2F%2Fwww.corho.com%3A8080%2F%23%2Flogin%2Fcallback"
      >
        <img
          src="https://qzonestyle.gtimg.cn/qzone/vas/opensns/res/img/Connect_logo_7.png"
          alt=""
        />
      </a>

      {/* 利用index.html引入的qqjsdk创建 */}
      {/* <span id="qqLoginBtn"></span> */}

      <button onClick={open}>自定义messagebox框</button>
    </div>
  );
}
export default Login;
